package com.ruix.app.mapper;

import org.json.JSONObject;

/**
 * Created by hadexs on 2017/4/28.
 */

public class ActionMapper implements  ApiMapper<Boolean>{

    @Override
    public Boolean transform(JSONObject response) {
        if (response != null){
            JSONObject data =  response.optJSONObject("data");
            if (data != null){
                return  data.optInt("success",0) == 1;
            }
        }
        return false;
    }
}
